cd ../
echo $?
podspec_file=$(ls *.podspec | head -n 1)
name=$(grep -E 's\.name' "$podspec_file" | sed "s/.*= '\(.*\)'.*/\1/")
version=$(grep -E 's\.version' "$podspec_file" | sed -n "s/.*= '\([^']*\)'.*/\1/p")
echo $name\($version\)
projectDir=$(pwd)
echo $projectDir
cd ~/Desktop
echo $?
desktopDir=$(pwd)
echo $desktopDir
rm -rf .TempCocoapodUploadDir
mkdir .TempCocoapodUploadDir
cd projectDir
cp -r $projectDir/. $desktopDir/.TempCocoapodUploadDir
cd $desktopDir/.TempCocoapodUploadDir
/bin/bash ./shell/confuse.sh -c
echo $?
git init
echo $?
git add .
echo $?
git commit -m $version
echo $?
git remote add origin https://gitee.com/lingyang-network-tech/$name.git
echo $?
git push -u --force origin "main"
echo $?
git tag $version
echo $?
git push --tag
echo $?
pod trunk push $name.podspec --allow-warnings --verbose --use-libraries --use-modular-headers
echo $?
cd ~/Desktop
rm -rf .TempCocoapodUploadDir